package com.xueyi.aixihu.mapper;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 绑定微信
 *
 * @author 俞烨
 */
public interface BindWxMapper {


    /**
     * 修改用户的openId
     * @param openId
     * @param userId
     */
    @Update("UPDATE dt_users SET wx_open_id = #{openId} WHERE id = #{userId}")
    void updateUserWxOpenId(String openId , Integer userId);

    @Select("SELECT wx_open_id FROM dt_users WHERE id = #{userId}")
    String findUserOpenId(Integer userId);
}
